home *** CD-ROM | disk | FTP | other *** search
- Path: news.delcoelect.com!c2xrfs
- From: c2xrfs@eng.delcoelect.com (Richard F. Smiley)
- Newsgroups: comp.std.c
- Subject: Double-character operators
- Date: 22 Jan 1996 23:51:48 GMT
- Organization: Delco Electronics
- Distribution: world
- Message-ID: <4e17uk$g3@kocrsv08.delcoelect.com>
- NNTP-Posting-Host: koptsw53.delcoelect.com
- Originator: c2xrfs@koptsw53
-
-
- Is the program fragment
-
- if ( Boolean_A & = 0x0020 )
-
- legal? Specifically, should the three-character sequence "& =" be
- treated as representing the two-character operator "&="?
-
- As I understand the standard (ISO section 5.1.1.2, phase 7), the "&"
- is converted into one token, and the "=" is converted into another.
- This then precludes treating them as one operator, and the program
- fragment is illegal.
-
- However, a compiler I respect instead treats this as a legal fragment
- involving the "&=" operator. Is that allowed? (The program fragment
- was caused by a bad macro definition. If the compiler had complained,
- we would have found the problem earlier.)
- --
- Richard Smiley (317) 451-0866 c2xrfs@eng.delcoelect.com
-